{template 'common/header'}
{if $op == 'display'}
<div class="main">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{php echo $this->createWebUrl('jilu', array('op' => 'display'));}">记录</a></li>
    </ul>

    <div class="panel panel-default">
        <div class="panel-body table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                <tr>
                    <th >序号</th>
                    <th >粉丝id</th>
                    <th>交易流水号</th>
                    <th>订单号</th>
                    <th>支付方式</th>
                    <th>金额</th>
                    <th>创建时间</th>
                    <th>状态</th>
                </tr>
                </thead>
                <tbody>
                {loop $lists $row}
                <tr>
                    <td>{$row['id']}</td>
                    <td>{$row['openid']}</td>
                    <td>{$row['transid']}</td>
                    <td>{$row['orderid']}</td>
                    <td>{$paytype[$row['paytype']]}</td>
                    <td>{$row['money']}</td>
                    <td>{php echo date("Y-m-d H:i:s", $row['createtime']);}</td>
                    <td><span class="label label-success">支付成功</span></td>
                </tr>
                {/loop}
                </tbody>
            </table>
            {$pager}
        </div>
    </div>
    <script type="text/javascript">
        function drop_confirm(msg, url){
            if(confirm(msg)){
                window.location = url;
            }
        }
    </script>

{elseif $op == 'edit'}

    <div class="main">
        <ul class="nav nav-tabs">
            <li ><a href="{php echo $this->createWebUrl('activity', array('op' => 'display'));}">活动管理</a></li>
            <li class="active" ><a href="{php echo $this->createWebUrl('activity', array('op' => 'edit'));}">添加活动</a></li>
        </ul>

        <style>
            .table td span{display:inline-block;margin-top:4px;}
            .table td input{margin-bottom:0;}
        </style>

        <div class="clearfix">
            <form class="form-horizontal form" action="" method="post" enctype="multipart/form-data">
                <div class="panel panel-default">
                    <div class="panel-heading">修改信息</div>
                    <div class="panel-body">

                        <input type="hidden" name="id" value="{$info['id']}">
                        <input type="hidden" name="op" value="edit">
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">活动标题</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="title" value="{$info['title']}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">回复标题</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="replytitle" value="{$info['replytitle']}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">回复简介</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="replycontent" value="{$info['replycontent']}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">回复照片</label>
                            <div class="col-sm-8 col-xs-12">
                                {php echo tpl_form_field_image('replyphoto', $info['replyphoto'], '')}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">分享照片</label>
                            <div class="col-sm-8 col-xs-12">
                                {php echo tpl_form_field_image('sharephoto', $info['sharephoto'], '')}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">分享标题1</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="sharetitle1" value="{$info['sharetitle1']}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">分享标题2</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="sharetitle2" value="{$info['sharetitle2']}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">分享标题3</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="sharetitle3" value="{$info['sharetitle3']}">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">二维码</label>
                            <div class="col-sm-8 col-xs-12">
                                {php echo tpl_form_field_image('qrcode', $info['qrcode'], '')}
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">链接</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="url" value="{$info['url']}">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">抽奖链接</label>
                            <div class="col-sm-8 col-xs-12">
                                <input type="text" class="form-control" placeholder="" name="drawurl" value="{$info['drawurl']}">
                            </div>
                        </div>

                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-12">
                        <input name="submit" type="submit" value="提交" class="btn btn-primary col-lg-1">
                        <input type="hidden" name="token" value="{$_W['token']}" />
                    </div>
                </div>
            </form>
        </div>
    </div>

{/if}

{template 'common/footer'}